import config from "@/config"
import http from "@/utils/request"

export default {
    userRegister: {
        url: `${config.API_URL}/platform/user/userRegister`,
        name: "用户注册",
        post: function (platformUserRegisterVo) {
            return http.post(this.url, platformUserRegisterVo);
        }
    },
    addUser: {
        url: `${config.API_URL}/platform/user/add`,
        name: "新增用户",
        post: function (platformUserAddVo) {
            return http.post(this.url, platformUserAddVo);
        }
    },
    delUsers: {
        url: `${config.API_URL}/platform/user/del`,
        name: "多选级联删除用户",
        delete: function (userIds) {
            return http.delete(this.url, userIds);
        }
    },
    editUser: {
        url: `${config.API_URL}/platform/user/edit`,
        name: "平台-修改用户信息",
        put: function (platformUserEditVo) {
            return http.put(this.url, platformUserEditVo);
        }
    },
    updatePassword: {
        url: `${config.API_URL}/platform/user/updatePassword`,
        name: "平台-修改用户密码",
        put: function (platformUserUpdatePasswordVo) {
            return http.put(this.url, platformUserUpdatePasswordVo);
        }
    },
    updateUserPassword: {
        url: `${config.API_URL}/platform/user/updateUserPassword`,
        name: "平台-修改用户密码",
        put: function (platformUserUpdateUserPasswordVo) {
            return http.put(this.url, platformUserUpdateUserPasswordVo);
        }
    },
    getUserById: {
        url: `${config.API_URL}/platform/user/info`,
        name: "平台-根据ID获取用户详情",
        get: function (userId) {
            return http.get(this.url + "/" + userId);
        }
    },
    pageListUser: {
        url: `${config.API_URL}/platform/user/pageList`,
        name: "平台-分页查询用户列表",
        get: function (platformUserQueryVo) {
            return http.get(this.url, platformUserQueryVo);
        }
    }
}
